package com.chebawang.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import java.util.Date;

/**
 * 类型:Entity-账号管理
 */
@Entity
@Table(name = "account")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "account_sequence")
public class Account {


    /**
     * 工号
     */
    private String num;
    /**
     * 姓名
     */
    private String name;
    /**
     * 账号类型 0管理员  1维修员   2查看员
     */
    private Integer aType;
    /**
     * 密码
     */
    private String password;
    /**
     * 密码
     */
    private String md5pass;
    /**
     * 医生id
     */
    @Id
    @GeneratedValue(generator = "paymentableGenerator")
    @GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
    @Column(name = "ID", nullable = false, length = 32)
    private String id;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createDate;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getMd5pass() {
        return md5pass;
    }

    public void setMd5pass(String md5pass) {
        this.md5pass = md5pass;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * 获取工号
     */
    public String getNum() {
        return num;
    }

    /**
     * 设置工号
     */
    public void setNum(String num) {
        this.num = num;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getaType() {
        return aType;
    }

    public void setaType(Integer aType) {
        this.aType = aType;
    }
}
